1. Field of the Invention
The invention relates to an image processing apparatus. More specifically, the invention relates to an image processing apparatus that can append new moving image data to moving image data of an existing moving image file recorded on a recording medium.
2. Description of the Related Art
As discussed in Japanese Patent Application Laid-Open No. 2002-218384, there is a conventional imaging apparatus that can append moving image data captured in a shooting operation to moving image data of an existing moving image file recorded on a recording medium. The imaging apparatus discussed in “Japanese Patent Application Laid-Open No. 2002-218384” can additionally record newly captured moving image data to the moving image data stored in the existing moving image file recorded on a recording medium.
On the other hand, the MPEG-4 AVC/H.264 standard is known as a recently introduced moving image compression encoding standard. The MPEG-4 AVC/H.264 standard can realize a compression rate that is higher than that of a conventional compression method (e.g., MEPG2), and can be used as a moving image data compression method applicable to an imaging apparatus. In particular, the MPEG-4 AVC/H.264 standard includes a newly defined Instantaneous Decoding Refresh (IDR) frame.
The IDR frame refers to an intra-frame coded frame (hereinafter referred to as “I frame”) using information that is contained only within the frame. The MPEG-4 AVC/H.264 standard regulates in such a way that a predicted frame (hereinafter referred to as “P frame”) or a bi-directional predicted frame (hereinafter referred to as “B frame”) that performs inter-frame coding using a subsequent frame cannot refer to any frame that precedes the IDR frame.
Further, according to the MPEG-4 AVC/H.264 standard, IDR frame identification ID (idr_pic_id) is assigned to each IDR frame although the same IDR frame identification ID (idr_pic_id) cannot be allocated to each of neighboring IDR frames (see ISO/IEC14496-10).
If connection of moving image data based on the MPEG-4 AVC/H.264 compression encoding standard is performed using the technique discussed in “Japanese Patent Application Laid-Open No. 2002-218384”, the following problem may arise. That is, the IDR frame identification ID (idr_pic_id) of the last frame of the moving image data stored in the existing moving image file recorded on the recording medium happens to be identical to the IDR frame identification ID (idr_pic_id) of the first frame of newly captured moving image data.